//
//  DetailsCheckShopCell.m
//  Cat
//
//  Created by lushitong on 2018/12/23.
//  Copyright © 2018年 lushitong. All rights reserved.
//

#import "DetailsCheckShopCell.h"

@interface DetailsCheckShopCell()

@property (nonatomic, strong) UILabel *checkInfoLabel;
@property (nonatomic, strong) UIImageView *arrowImageView;

@end
@implementation DetailsCheckShopCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {
		self.cellSeparatorStyle = QKUITableViewCellSeparatorStyleSingleLineBottomZero;
		self.selectionStyle = UITableViewCellSelectionStyleNone;
		[self loadSubviews];
	}
	return self;
}

- (void)loadSubviews {
	[self.contentView addSubviews:@[self.checkInfoLabel,self.arrowImageView]];
	
	[self.checkInfoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.centerY.equalTo(self.contentView.mas_centerY);
		make.left.equalTo(self.contentView.mas_left).offset(kQKFitModuleDecimal(16));
	}];
	
	[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.size.equalTo(CGSizeMake(kQKFitModuleDecimal(16), kQKFitModuleDecimal(16)));
		make.centerY.equalTo(self.checkInfoLabel.mas_centerY);
		make.right.equalTo(self.contentView.mas_right).offset(-kQKFitModuleDecimal(16));
	}];
}

#pragma mark----- lazy init -----

- (UILabel *)checkInfoLabel {
	if (!_checkInfoLabel) {
		_checkInfoLabel = [UILabel labelWithText:@"查看宝贝详情" font:[UIFont systemFontOfSize:kQKFitFont(14)] textColor:COLOR_WITH_HEX(0x57524F)];
	}
	return _checkInfoLabel;
}

- (UIImageView *)arrowImageView {
	if (!_arrowImageView) {
		_arrowImageView  = [[UIImageView alloc] init];
		_arrowImageView.image = [UIImage imageNamed:@"arrow_right"];
	}
	return _arrowImageView;
}

@end
